<?php

class Model_DbTable_Member extends Ext_Model_DbTable_Abstract
{
    protected $_name            = 'member';
    protected $_primary         = 'id';
    protected $_rowClass        = 'Model_Member';
    protected $_dependentTables = array('Model_DbTable_MemberGroup');
    protected $_referenceMap    = array(
        'Creator' => array(
            'columns'           => 'id',
            'refTableClass'     => 'Model_DbTable_Group',
            'refColumns'        => 'creator_id'
        )
    );

    public function getListQuery($filters = array())
    {
        $query = parent::getListQuery($filters);
        $query->where('status = ?', Model_Member::STATUS_ACTIVE);
        return $query;
    }
}